/* 
 * File:   nweb.h
 * Author: Kevin Cheung
 *
 */

#ifndef NWEB_H
#define	NWEB_H

#ifdef	__cplusplus
extern "C" {
#endif

#define BUFSIZE 8096

typedef struct request_rec request_rec;

struct request_rec {
    int fd; // file describer
    int hit; // index of the request
    char *buffer; // request content

    /** Request method (eg. GET, HEAD, POST, etc.) */
    char *method;

    /** The URI without any parsing performed */
    char *unparsed_uri;
    /** The path portion of the URI, or "/" if no path provided */
    char *uri;
    /** The filename on disk corresponding to this response */
    char *filename;
    /** Content-Type */
    char *fstr;
};

void request_rec_destroy(request_rec *r);

#ifdef	__cplusplus
}
#endif

#endif	/* NWEB_H */

